//
//  ViewController.swift
//  JCPopView
//
//  Created by 吴金成 on 16/10/9.
//  Copyright © 2016年 吴金成. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    @IBAction func btnAction(_ sender: UIButton) {
        
        let imageView = UIImageView(image: UIImage(named: "Unknown.jpg"))
        imageView.frame = CGRect(x: 0, y: 0, width: 200, height: 300)
        
//        JCPopView.share().tapOutsideToDismiss = false
        JCPopView.share().shadeBackgroundType = .solid
        
        JCPopView.share().showView(presentView: imageView, animated: true) { 
        
            print("视图弹出完成")
        }
        
        JCPopView.share().closeCompletion = {
            
            print("视图消失")
        }
    }

}

